package com.yanqu.road.server.cmd.activity.busyfarming;

import com.yanqu.road.pb.activity.BusyFarmingProto;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;
import com.yanqu.road.server.manger.activity.busyfarming.BusyFarmingMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;
import io.netty.channel.ChannelHandlerContext;

@Cmd(code = Protocol.S_BUSY_FARMING_FRIEND_HOME_DETAIL_FROM_CROSS,desc = "跨服商会果园详情")
public class BusyFarmingFriendHomeDetailFromCross implements Command {


    @Override
    public void execute(ChannelHandlerContext ctx, YanQuMessage packet) throws Exception {

        BusyFarmingProto.BusyFarmingFriendHomeDetailCrossReqMsg crossReqMsg = BusyFarmingProto.BusyFarmingFriendHomeDetailCrossReqMsg.parseFrom(packet.getBytes());

        BusyFarmingMgr.friendHomeDetail(crossReqMsg.getActivityId(), crossReqMsg.getUserId(), crossReqMsg.getSrcServerId(), crossReqMsg.getSrcUserId(), crossReqMsg.getCanWatering());
    }
}
